<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class WarehouseType extends BaseModel
{
    use HasFactory;
    protected $table = 'warehouse_type';
    // 允许批量操作的字段
    protected $fillable = ['warehouse_type','created_at','updated_at'];

    public function scopeSearch($query,$params)
    {
        if(!empty($params['warehouse_type'])){
            $query->where('warehouse_type',$params['warehouse_type']);
        }
        return $query;
    }
}
